|
|
|
|
|
|
|
Completing an ODBC registration inserts data into the HKEY_USERS\DEFAULT\ODBC\ODBC.INI section of the Windows Registry on 32-bit systems. The data is added to the ODBC.INI file in the <WINDOWS> folder on 16-bit systems. You can add features to the earlier cmdDBRegister_Click example by prompting the user to enter the SourceName and DriverName. You could also fill out all values within the program and set the SilentFlag to True. In this way, you could use the routine to install new ODBC connections for Visual Basic applications without requiring the user to know anything at all about ODBC or Microsoft Jet. |
|
|
|
|
| |
|
|
|
|
Failure to register an ODBC data source properly can result in un-expected errors and possible loss of data. Be sure to test your RegisterDatabase routines completely before using them on live data. |
|
|
|
|
|
|
|
|
|
|
The SetOption method of the DBEngine object allows you to override performance values in the Registry at runtime. You can use this option to perform runtime tuning of the Microsoft Jet engine. Table 9.1 shows the values you can adjust using the SetOption method. |
|
|
|
|
| Table 9.1. Tuning values for the SetOption method of the DBEngine. | | Constant | Description | | dbPageTimeout | PageTimeout key | | dbSharedAsyncDelay | SharedAsyncDelay key | | dbExclusiveAsyncDelay | ExclusiveAsyncDelay key | | dbLockRetry | LockRetry key | | dbUserCommitSync | UserCommitSync key | | dbImplicitCommitSync | ImplicitCommitSync key | | dbMaxBufferSize | MaxBufferSize key | | dbMaxLocksPerFile | MaxLocksPerFile key | | dbLockDelay | LockDelay key | | dbRecycleLVs | RecycleLVs key | | dbFlushTransactionTimeout | FlushTransactionTimeout key |
|
|
|